home *** CD-ROM | disk | FTP | other *** search
/ Robotics & Artificial Int…3 (Professional Edition) / Robotics & Artificial Intelligence Tools 2003 (Professional Edition).iso / computer vision recognition / rcinstall.exe / Disk1 / data1.cab / ASP_Pages / Default.asp < prev    next >
Encoding:
Text File  |  2001-12-12  |  7.1 KB  |  234 lines

  1. <!------------------------------------------------------------------------------------------------- 
  2.                           Copyright by Kofax Image Products                    
  3. -------------------------------------------------------------------------------------------------->
  4. <%@ LANGUAGE = VBScript %>
  5.     <%
  6.         Response.Expires = 60
  7.         Response.Expiresabsolute = Now() - 1
  8.         Response.AddHeader "pragma","no-cache"
  9.         Response.AddHeader "cache-control","private"
  10.         Response.CacheControl = "no-cache"
  11. '---------------------------------------------------------------------------------------------------
  12. 'Checking browser
  13. '---------------------------------------------------------------------------------------------------
  14.         dim sHTTPUserAgent
  15.         sHTTPUserAgent=LCase(Request.ServerVariables("HTTP_USER_AGENT"))
  16.         if (InStr(sHTTPUserAgent,"msie")>0) then
  17.             if ((InStr(sHTTPUserAgent,"msie 3")>0) OR (InStr(sHTTPUserAgent,"msie 4")>0)) then
  18.                 Response.Redirect("Error.asp")                
  19.             else
  20.                 if (InStr(sHTTPUserAgent,"msie 5.0")>0) then
  21.                     if (InStr(sHTTPUserAgent,"msie 5.00")>0) then
  22.                         Response.Redirect("Error.asp")                                        
  23.                     end if                     
  24.                 end if 
  25.             end if
  26.         else
  27.             Response.Redirect("Error.asp")    
  28.         end if
  29.  
  30. '---------------------------------------------------------------------------------------------------
  31. 'Getting local strings
  32. '--------------------------------------------------------------------------------------------------
  33.         dim oConn,oRs,i,sFilePath,sLangTable
  34.         dim display(2) 
  35.         on error resume next
  36.         set oConn = Server.CreateObject("ADODB.Connection")
  37.         sFilePath=Server.MapPath("csuiweb.mdb")
  38.         
  39.         oConn.Open("Driver={Microsoft Access Driver (*.mdb)};DBQ=" & sFilePath & ";")
  40.         if err then
  41.                set oConn=nothing
  42.             err.clear
  43.             Response.Redirect("Error.asp?Err=1")
  44.         end if
  45.         sLangTable=mid(Request.ServerVariables("HTTP_ACCEPT_LANGUAGE"),1,2)
  46.         if trim("" & sLangTable)="" then
  47.             sLangTable="En"
  48.         end if    
  49.         Set oRs=oConn.Execute("SELECT * FROM " & sLangTable & " WHERE Id=0")
  50.         if (err and (Err.Number=-2147217865)) then        
  51.             err.Clear
  52.             sLangTable="En"
  53.             Set oRs=oConn.Execute("SELECT * FROM " & sLangTable & " WHERE Id=0")
  54.         end if        
  55.         Response.Write("<META HTTP-EQUIV='CONTENT-LANGUAGE' CONTENT='" & oRS("Value") & "'>")
  56.         Set oRs=oConn.Execute("SELECT * FROM " & sLangTable & " WHERE Id Between 1 AND 3")
  57.         for i=0 to 2
  58.             display(i)=oRs("Value")
  59.             oRs.MoveNext            
  60.         next
  61.             
  62.         oRs.Close
  63.         oConn.Close    
  64.         if err then
  65.             err.clear
  66.             Response.Redirect("Error.asp?Err=1")
  67.         end if    
  68. %>
  69. <HTML>
  70.     <HEAD>
  71.         <TITLE><%=display(0)%> <%=display(2)%></TITLE>
  72.         <link rel="STYLESHEET" type="text/css" href="coversheet.css">
  73.         <script language="JavaScript">
  74.         var sReturnData="";
  75.         var sTitle="";
  76.         var sFlag="";
  77.         var oDialog="Utility.asp?Nocache=<%=server.URLencode(now())%>";
  78.         var UtilWindow;
  79.         var bStatus = false;
  80.         var bAboutOpened=false;
  81.         var bHelpOpened=false;
  82.         var AboutWindow,HelpWindow;
  83.         //Updating data from package window and submitting data to coversheet window
  84.         
  85.         
  86.         function Update()
  87.         {
  88.             Test.innerHTML=sTitle;
  89.             Flag.innerHTML=sFlag;
  90.             InputData.innerHTML=sReturnData;
  91.             document.frmData.submit();
  92.         }
  93.         
  94.         
  95.         //opening package window and setting focus to it
  96.         function LoadUtility()
  97.         {
  98.             var wtop,wleft;
  99.             ResizeWindow();
  100.             wtop= window.screenTop + 75;
  101.             wleft= window.screenLeft + 85;
  102.         //    param="width=280, height=275, left=" + wleft + ", top=" + wtop + ", toolbar=no, menubar=no, location=no, directories=no,resizable=no,fullscreen=0,minimize=no,maximize=no";
  103.         //    UtilWindow=window.open('Utility.asp', "myWindowOne", param);    
  104.         //    if (bDialogStatus==false)
  105.             if (bStatus==false)
  106.                 {
  107.                 UtilWindow=window.showModelessDialog(oDialog, window, "status:no;center:no;help:no;minimize:no;maximize:no;border:thin;statusbar:no;dialogWidth:280px;dialogHeight:275px;dialogTop=" + wtop + "px;dialogLeft=" + wleft + "px;");    
  108.                 UtilWindow.focus();
  109.                 bStatus=true;
  110.                 }
  111.             else
  112.                 {
  113.                     if (UtilWindow.closed) 
  114.                     {
  115.                         UtilWindow=window.showModelessDialog(oDialog, window, "status:no;center:no;help:no;minimize:no;maximize:no;border:thin;statusbar:no;dialogWidth:280px;dialogHeight:275px;dialogTop=" + wtop + "px;dialogLeft=" + wleft + "px;");    
  116.                         UtilWindow.focus();
  117.                     }
  118.                     else
  119.                     {
  120.                         UtilWindow.Rechange(window.screenLeft + 85,window.screenTop + 75);
  121.                         UtilWindow.focus();
  122.                     }
  123.                 }
  124.         }
  125.         
  126.         //resizing the window and relocating the package window 
  127.         function ResizeWindow()
  128.         {
  129.         
  130.             var dx,dy;
  131.             try
  132.             {
  133.                 
  134.                 dx = (document.body.clientWidth < 400) ? (400 - document.body.clientWidth) : 0; 
  135.                 dy = (document.body.clientHeight < 420) ? (420 - document.body.clientHeight) : 0; 
  136.                 window.resizeBy(dx,dy);
  137.                 UtilWindow.Rechange(window.screenLeft + 85,window.screenTop + 75);
  138.                 UtilWindow.focus();
  139.             }
  140.             catch (e)
  141.             {
  142.             }
  143.         
  144.         }
  145.         
  146.         //opening and showing the about window
  147.         function ShowAbout()
  148.         {
  149.             if (bAboutOpened==false)
  150.                 {
  151.                     AboutWindow=window.open("About.asp", "AboutWindow", "width=400, height=250, left=375, top=175, toolbar=no, menubar=no, location=no, directories=no,resizable=no");
  152.                     bAboutOpened=true;
  153.                 }
  154.             else
  155.              {
  156.                  if (AboutWindow.closed)
  157.                   {
  158.                     AboutWindow=window.open("About.asp", "AboutWindow", "width=400, height=250, left=375, top=175, toolbar=no, menubar=no, location=no, directories=no,resizable=no");          
  159.                   }
  160.              }        
  161.             AboutWindow.focus();
  162.         }
  163.         //opening and showing the about window
  164.         function ShowHelp()
  165.         {
  166.             if (bHelpOpened==false)
  167.                 {
  168.                     HelpWindow=window.open("WebHelp/index.htm", "HelpWindow");
  169.                     bHelpOpened=true;
  170.                 }
  171.             else
  172.              {
  173.                  if (HelpWindow.closed)
  174.                   {
  175.                     HelpWindow=window.open("WebHelp/index.htm", "HelpWindow");
  176.                   }
  177.              }        
  178.             HelpWindow.focus();
  179.         }
  180.         //closing about and help windows
  181.         
  182.         function UnloadAll()
  183.         {
  184.         
  185.             if (bAboutOpened)
  186.             {
  187.                 if (!AboutWindow.closed)
  188.                 {
  189.                     AboutWindow.close();        
  190.                 }
  191.             }
  192.             if (bHelpOpened)
  193.             {
  194.                 if (!HelpWindow.closed)
  195.                 {
  196.                     HelpWindow.close();        
  197.                 }
  198.             }
  199.         
  200.         }
  201.         
  202.         </script>        
  203.         
  204. </head>
  205.  
  206. <body onload="LoadUtility();"  onclick="LoadUtility();"  onUnload="UnloadAll();" onresize="ResizeWindow();">
  207. <!---     <form name="frmData" action='CoverSheet.asp?lang=<%=Request.QueryString("lang")%>' method="post"  > --->
  208.     <form name="frmData" action="CoverSheet.asp" method="post">
  209.     <center>
  210.     <table width="90%">
  211.     <tr>
  212.     <td height="200" width="50%"> </td>    
  213.     <td height="200" width="50%"> </td>        
  214.     </tr>
  215.     <tr>
  216.     <td height="60%" width="50%"></td>    
  217.     <td height="60%" width="50%"><image src="images/splashBkgd.gif" ALT='<%=display(0)%>'>  
  218.      </td>        
  219.     </tr>
  220.     <tr>
  221.     <td height="20%" width="50%"></td>    
  222.     <td height="20%" width="50%">
  223.     <div id="Test" class="processing"></div>
  224.     <div id="Flag"><input name="Submited" value="False" type="Hidden"></div>
  225.     <div id="InputData" style="visibility:hidden"></div>
  226. <!---     <IFRAME NAME="content_frame" width="488" height="244" SRC="Utility.asp" frameborder="1"></IFRAME>  --->
  227.     </td>        
  228.     </tr>
  229.     </table>
  230.     </center>    
  231.     </form>
  232. </body>
  233. </html>
  234.